package utils.ResponseBody;

public enum ResponseStatus {
    SUCCESS(0,"Success"), //请求成功
    ERROR(1,"Error"),	   //请求失败
    PARAM_ERROR(2,"Param Errors"), //请求参数有误
    USER_NULL(4,"No this User"),//用户不存在
    PASSWORD_ERROR(5,"Password Error"),//输入密码错误
    NO_LOGIN(6,"NO_LOGIN"), //未登录
    MANY_LOGINS(7,"MANY_LOGINS"), //多用户在线（踢出用户）
    UPDATE(8,"UPDATE"), //用户信息或权限已更新（退出重新登录）
    LOCK(9,"LOCK"), //用户已锁定
    UNAUTHORIZED(0xa,"Unauthorized"), //未授权
    DATA_ERROR(0xb,"Data Error"); //数据错误

    private int code;
    private String msg;

    ResponseStatus(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode(){
        return this.code;
    }

    public String getMsg(){
        return this.msg;
    }
}
